{
  const e = (e, t) => {
      !0 !== r.dataset.ready && r.prepare();
      try {
        if (r.prefs.userAgentDataBuilder) {
          const t = new (class {
            #e;
            constructor({ p: e, ua: r }) {
              this.#e = e;
              const t = e.browser.major,
                s =
                  "Chrome" === e.browser.name
                    ? "Google Chrome"
                    : e.browser.name;
              if (
                ((this.brands = [
                  { brand: "Not/A)Brand", version: "8" },
                  { brand: "Chromium", version: t },
                  { brand: s, version: t },
                ]),
                (this.mobile =
                  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
                    r
                  )),
                (this.platform = "Unknown"),
                e.os && e.os.name)
              ) {
                const r = e.os.name.toLowerCase();
                r.includes("mac")
                  ? (this.platform = "macOS")
                  : r.includes("debian")
                  ? (this.platform = "Linux")
                  : (this.platform = e.os.name);
              }
            }
            toJSON() {
              return {
                brands: this.brands,
                mobile: this.mobile,
                platform: this.platform,
              };
            }
            getHighEntropyValues(e) {
              if (!e || !1 === Array.isArray(e))
                return Promise.reject(
                  Error(
                    "Failed to execute 'getHighEntropyValues' on 'NavigatorUAData'"
                  )
                );
              const r = this.toJSON();
              return (
                e.includes("architecture") &&
                  (r.architecture = this.#e?.cpu?.architecture || "x86"),
                e.includes("bitness") && (r.bitness = "64"),
                e.includes("model") && (r.model = ""),
                e.includes("platformVersion") &&
                  (r.platformVersion = this.#e?.os?.version || "10.0.0"),
                e.includes("uaFullVersion") &&
                  (r.uaFullVersion = this.brands[0].version),
                e.includes("fullVersionList") &&
                  (r.fullVersionList = this.brands),
                Promise.resolve(r)
              );
            }
          })(r.prefs.userAgentDataBuilder);
          e.__defineGetter__("userAgentData", () => t);
        }
        delete r.prefs.userAgentDataBuilder;
        for (const t of Object.keys(r.prefs))
          "type" !== t &&
            ("[delete]" === r.prefs[t]
              ? delete Object.getPrototypeOf(e)[t]
              : e.__defineGetter__(t, () =>
                  "empty" === r.prefs[t] ? "" : r.prefs[t]
                ));
      } catch (s) {
        console.error("UA_SET_FAILED", s);
      }
    },
    r = document.getElementById("uas-port");
  r.addEventListener("override", (t) => {
    if (t.detail.id === r.dataset.id) e(navigator, t.detail.reason);
    else {
      const s = r.ogs.get(t.detail.id).navigator;
      e(s, t.detail.reason);
    }
  });
}
